home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 49 / Amiga Format CD49 (2000-01-17)(Future Publishing)(GB)(Track 1 of 3)[!][issue 2000-02].iso / -serious- / graphics / amicad / arexx_english / calc.amicad < prev    next >
Text File  |  1999-12-06  |  639b  |  17 lines

  1. /* calculatrice en virgule flottante */
  2. /* $VER: 1.00e (© R.Florac, 22 mai 1999) */
  3.  
  4. options results
  5. if ~show('L','rexxmathlib.library') then
  6.    call addlib('rexxmathlib.library',0,-30)
  7.  
  8. cr='0a'x
  9. p='"Give the operation'cr'to compute.'cr'Operators : * / + - // ** %'cr'Functions : abs acos acosh asin asinh'cr'atan atanh ceil cos cosh cot cotan'cr'csc exp fabs fact floor int'cr'ln log10 nint pow(x,y) sec'cr'sin sinh sqrt tan tanh"'
  10. 'ASKTEXT('p',"")'
  11. calcul=result
  12. if calcul="" then exit
  13. resultat = calc.rexx(calcul)
  14. 'REQUEST("'calcul' = 'resultat||cr'Do you want to write'cr'this result ?")'
  15. if result="1" then 'WRITE("'resultat'",0,0)'
  16.  
  17.